
<template>
    <el-form ref="ruleFormRef" :model="ruleForm" label-width="120px" class="demo-ruleForm" size="default" status-icon>

        <section>
            <el-form-item label="赠送积分" prop="keyword">
                <el-input v-model="ruleForm.keyword" placeholder="赠送积分" />
            </el-form-item>
            <el-form-item label="赠送成长值" prop="productSn">
                <el-input v-model="ruleForm.productSn" placeholder="赠送成长值" />
            </el-form-item>
            <el-form-item label="积分购买限制" prop="productSn">
                <el-input v-model="ruleForm.productSn" placeholder="积分购买限制" />
            </el-form-item>
            <el-form-item label="预告商品" prop="productSn">
                <el-switch v-model="ruleForm.productSn" class="ml-2" :active-value="1" :inactive-value="0" />
            </el-form-item>
            <el-form-item label="商品上架" prop="productSn">
                <el-switch v-model="ruleForm.productSn" class="ml-2" :active-value="1" :inactive-value="0" />
            </el-form-item>
            <el-form-item label="商品推荐" prop="productSn">
                &nbsp; 新品 &nbsp;
                <el-switch v-model="ruleForm.productSn" class="ml-2" :active-value="1" :inactive-value="0" />
                &nbsp; 推荐 &nbsp;
                <el-switch v-model="ruleForm.productSn" class="ml-2" :active-value="1" :inactive-value="0" />
            </el-form-item>

            <el-form-item label="服务保证">
                <el-checkbox-group v-model="ruleForm.productSn">
                    <el-checkbox label="无忧退货" name="type" />
                    <el-checkbox label="快速退款" name="type" />
                    <el-checkbox label="免费包邮" name="type" />
                </el-checkbox-group>
            </el-form-item>
            <el-form-item label="详情页标题" prop="keyword">
                <el-input v-model="ruleForm.keyword" placeholder="详情页标题" />
            </el-form-item>
            <el-form-item label="详情页描述" prop="keyword">
                <el-input v-model="ruleForm.keyword" placeholder="详情页描述" />
            </el-form-item>
            <el-form-item label="商品关键字" prop="keyword">
                <el-input v-model="ruleForm.keyword" placeholder="商品关键字" />
            </el-form-item>
            <el-form-item label="商品备注" prop="keyword">
                <el-input v-model="ruleForm.brandId" :rows="2" type="textarea" placeholder="商品备注" />
            </el-form-item>

            <el-form-item label="选择优惠方式" prop="keyword">

            </el-form-item>
        </section>
    </el-form>
    <p style="text-align:center">
        <el-button size="large" @click="emit('next', 0)">上一步, 填写商品信息</el-button>
        <el-button type="primary" size="large" @click="next">下一步, 填写商品促销</el-button>
    </p>

</template>
    
<script setup lang='ts'>

import { reactive, ref } from 'vue'
const ruleForm = reactive<Indexable>({
    keyword: '',
    productSn: '',
    productCategoryId: '',
    brandId: '',
    publishStatus: '',
    verifyStatus: ''
})

const emit = defineEmits(['next'])
const next = () => {
    emit('next', 2)
}
</script>
    
<style>
</style>